package com.qms.qep.domain.vo;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.qms.qep.domain.Batch;
import com.qms.qep.domain.ProcessRecord;

/**
 * 批次追溯VO
 * 
 * @author qep
 */
public class BatchTraceVO {
    
    /** 批次基本信息 */
    private Batch batch;
    
    /** 产品名称 */
    private String productName;
    
    /** 产品规格 */
    private String productSpecification;
    
    /** 产品材质 */
    private String productMaterial;
    
    /** 工序流转记录列表 */
    private List<ProcessRecord> processRecords;
    
    /** 检验任务列表 */
    private List<InspectionSummary> inspections;
    
    /** 质量证书列表 */
    private List<CertificateSummary> certificates;
    
    public static class InspectionSummary {
        /** 检验任务ID */
        private Long id;
        
        /** 检验任务编号 */
        private String taskCode;
        
        /** 检验类型 */
        private String inspectionType;
        
        /** 检验日期 */
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date inspectionDate;
        
        /** 检验人员 */
        private String inspector;
        
        /** 检验结果 */
        private String inspectionResult;

        public Long getId() {
            return id;
        }

        public void setId(Long id) {
            this.id = id;
        }

        public String getTaskCode() {
            return taskCode;
        }

        public void setTaskCode(String taskCode) {
            this.taskCode = taskCode;
        }

        public String getInspectionType() {
            return inspectionType;
        }

        public void setInspectionType(String inspectionType) {
            this.inspectionType = inspectionType;
        }

        public Date getInspectionDate() {
            return inspectionDate;
        }

        public void setInspectionDate(Date inspectionDate) {
            this.inspectionDate = inspectionDate;
        }

        public String getInspector() {
            return inspector;
        }

        public void setInspector(String inspector) {
            this.inspector = inspector;
        }

        public String getInspectionResult() {
            return inspectionResult;
        }

        public void setInspectionResult(String inspectionResult) {
            this.inspectionResult = inspectionResult;
        }
    }
    
    public static class CertificateSummary {
        /** 证书ID */
        private Long id;
        
        /** 证书编号 */
        private String certificateNo;
        
        /** 证书类型 */
        private String certificateType;
        
        /** 签发日期 */
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date issueDate;
        
        /** 签发人 */
        private String issuer;
        
        /** 文件地址 */
        private String fileUrl;

        public Long getId() {
            return id;
        }

        public void setId(Long id) {
            this.id = id;
        }

        public String getCertificateNo() {
            return certificateNo;
        }

        public void setCertificateNo(String certificateNo) {
            this.certificateNo = certificateNo;
        }

        public String getCertificateType() {
            return certificateType;
        }

        public void setCertificateType(String certificateType) {
            this.certificateType = certificateType;
        }

        public Date getIssueDate() {
            return issueDate;
        }

        public void setIssueDate(Date issueDate) {
            this.issueDate = issueDate;
        }

        public String getIssuer() {
            return issuer;
        }

        public void setIssuer(String issuer) {
            this.issuer = issuer;
        }

        public String getFileUrl() {
            return fileUrl;
        }

        public void setFileUrl(String fileUrl) {
            this.fileUrl = fileUrl;
        }
    }

    public Batch getBatch() {
        return batch;
    }

    public void setBatch(Batch batch) {
        this.batch = batch;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductSpecification() {
        return productSpecification;
    }

    public void setProductSpecification(String productSpecification) {
        this.productSpecification = productSpecification;
    }

    public String getProductMaterial() {
        return productMaterial;
    }

    public void setProductMaterial(String productMaterial) {
        this.productMaterial = productMaterial;
    }

    public List<ProcessRecord> getProcessRecords() {
        return processRecords;
    }

    public void setProcessRecords(List<ProcessRecord> processRecords) {
        this.processRecords = processRecords;
    }

    public List<InspectionSummary> getInspections() {
        return inspections;
    }

    public void setInspections(List<InspectionSummary> inspections) {
        this.inspections = inspections;
    }

    public List<CertificateSummary> getCertificates() {
        return certificates;
    }

    public void setCertificates(List<CertificateSummary> certificates) {
        this.certificates = certificates;
    }
} 